﻿namespace Om.Camera
{
    public interface IBaseCamera
    {
        public bool IsConnected { get;}
        public event Action<byte[]> FrameReceived;
        public event EventHandler<bool> ConnectionChanged;

        public string Id { get; }

        public Task<List<string>> GetCameraList();

        public Task Connect(string cameraIpOrName);

        public Task Disconnect();


        public Task Capture(string fileName);

        public bool CanSetExposure { get; }
        /// <summary>
        /// 设置自动曝光
        /// </summary>
        /// <param name="isAutoExposure"></param>
        /// <returns></returns>
        public Task<bool> SetAutoExposure(bool isAutoExposure);
        /// <summary>
        /// 设置曝光值
        /// </summary>
        /// <param name="val"></param>
        /// <returns></returns>
        public Task<bool> SetExposureValue(int val);
        /// <summary>
        /// 获取曝光值
        /// </summary>
        /// <returns></returns>
        public Task<int> GetExposureValue();
    }
}
